package com.linesum.code.domain.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * entity的基本类
 * @author chenzf
 *
 */
@MappedSuperclass
@EntityListeners(BaseEntityListener.class)
@DynamicInsert
@DynamicUpdate
public class BaseEntity implements Serializable {

	private static final long serialVersionUID = -6168124754731916674L;

	private Long id; //主键
	private String lastModifyBy; //最后修改人
	private Date lastModifyTime; //最后修改时间

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getLastModifyBy() {
		return lastModifyBy;
	}

	public void setLastModifyBy(String lastModifyBy) {
		this.lastModifyBy = lastModifyBy;
	}

	public Date getLastModifyTime() {
		return lastModifyTime;
	}

	public void setLastModifyTime(Date lastModifyTime) {
		this.lastModifyTime = lastModifyTime;
	}

}
